/*------------------------------------------------------
                hou_elearningGEN beta v1.0
Author: xtrung.net@gmail.com
Write On: 04/27/2008
Create On:4/13/2012 11:22:47 AM
------------------------------------------------------*/
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
namespace hou_elearning.Entity
{
    public class DanhmuckiemtraEntity
    {
        public DanhmuckiemtraEntity()
        {
			m_pk_idanhmuckiemtraid=0;
			m_stendanhmuc="";
			m_skyhieu="";
			m_ihesodiem=0;
        }
		private Int16 m_pk_idanhmuckiemtraid;
		public Int16 PK_iDanhmuckiemtraID
		{
			get { return m_pk_idanhmuckiemtraid ; }
			set { m_pk_idanhmuckiemtraid = value; }
		}
		private String m_stendanhmuc;
		public String sTendanhmuc
		{
			get { return m_stendanhmuc ; }
			set { m_stendanhmuc = value; }
		}
		private String m_skyhieu;
		public String sKyhieu
		{
			get { return m_skyhieu ; }
			set { m_skyhieu = value; }
		}
		private Int16 m_ihesodiem;
		public Int16 iHesodiem
		{
			get { return m_ihesodiem ; }
			set { m_ihesodiem = value; }
		}

        #region Comparison
        public static List<DanhmuckiemtraEntity> Sort(List<DanhmuckiemtraEntity> list, String SortExpression, String SortDirection)
        {
            string strComparisonAttrb="COMPARISON_"+SortExpression;
            PropertyInfo propInfo= typeof(DanhmuckiemtraEntity).GetProperty(strComparisonAttrb);
            if (propInfo != null)
            {
                list.Sort(propInfo.GetGetMethod().Invoke(null,null) as Comparison<DanhmuckiemtraEntity>);
                if (SortDirection == "DESC")
                    list.Reverse();
            }
            return list;
        }
        
		public static Comparison<DanhmuckiemtraEntity> COMPARISON_PK_iDanhmuckiemtraID
		{
			get
			{
				return delegate(DanhmuckiemtraEntity entity,DanhmuckiemtraEntity other)
				{
					return entity.PK_iDanhmuckiemtraID.CompareTo(other.PK_iDanhmuckiemtraID);
				};
			}
		}
		public static Comparison<DanhmuckiemtraEntity> COMPARISON_sTendanhmuc
		{
			get
			{
				return delegate(DanhmuckiemtraEntity entity,DanhmuckiemtraEntity other)
				{
					return entity.sTendanhmuc.CompareTo(other.sTendanhmuc);
				};
			}
		}
		public static Comparison<DanhmuckiemtraEntity> COMPARISON_sKyhieu
		{
			get
			{
				return delegate(DanhmuckiemtraEntity entity,DanhmuckiemtraEntity other)
				{
					return entity.sKyhieu.CompareTo(other.sKyhieu);
				};
			}
		}
		public static Comparison<DanhmuckiemtraEntity> COMPARISON_iHesodiem
		{
			get
			{
				return delegate(DanhmuckiemtraEntity entity,DanhmuckiemtraEntity other)
				{
					return entity.iHesodiem.CompareTo(other.iHesodiem);
				};
			}
		}
        #endregion
    }
}
